//
//  MKAPITestHttpAPIBase.h
//  MKAPITests
//
//  Created by 苏尚进 on 2022/9/5.
//  Copyright © 2022 moon. All rights reserved.
//

#import <MKAPI/MKAPI.h>
#import "NSTimer+MKAPITest.h"
#import <XCTest/XCTest.h>
#import "MKAPITestTaskBase.h"
#import "MKAPITestHttpRequestAF.h"
#import "MKAPIServiceHeaders.h"
NS_ASSUME_NONNULL_BEGIN

@interface MKAPITestHttpAPIBase : MKAPITestTaskBase

@property(nonatomic,readonly) MKAPIHttpRequestType requestType;//获取数据、上传文件、下载文件

/// 发送指定的网络请求，同时在debug模式下，会输出请求的发送和接收日志
/// - Parameters:
///   - request: 网络请求对象
///   - completion: 完成回调
- (void)sendRequest:(MKAPIHttpRequestBase *)request withCompletion:(nullable MKAPIServiceRequestBlock)completion;

//日志输出
- (NSString *)requestDescriptionWithRequest:(nullable __kindof MKAPIHttpRequestBase *)request requestParam:(nullable __kindof MKAPIRequestParam *)requestParam;
- (NSString *)responseDescription:(MKAPIHttpRequestBase *)request requestParam:(MKAPIRequestParam *)requestParam respondData:(id)responseData error:(NSError *)error;

- (void)configCommonRequest:(MKAPIRequestParam *)requestParam path:(NSString *)path;

- (void)sendRequestWithParam:(MKAPIRequestParam *)requestParam withCompletion:(nullable MKAPIServiceRequestBlock)completion;
@end

NS_ASSUME_NONNULL_END
